<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   ®γσ的回复  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/profile/ryo/replies/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466463449: Accept with keywords: (title(0.0):论坛, topn(0.2):专业课程,帖子,统计学,会员,数据格式,缺失值,用户名,经历,主站,科技,源码,数据,收藏夹,马币,科系,密码,总计,科学,学士,边学边,功课,悟空,定义新,主题,普通,p值,哭死了,课程,论坛,学会).-->
 </head>
 <body class="bbp-user-page single singular bbpress single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    ®γσ的回复
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-0 type- status-publish hentry" id="post-0">
        <header class="entry-header">
         <h1 class="entry-title">
          ®γσ
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div id="bbp-user-wrapper">
           <div id="bbp-single-user-details">
            <div id="bbp-user-avatar">
             <span class="vcard">
              <a class="url fn n" href="http://cos.name/cn/profile/ryo/" rel="me" title="®γσ">
               <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=150&amp;d=monsterid&amp;r=g"/>
              </a>
             </span>
            </div>
            <!-- #author-avatar -->
            <div id="bbp-user-navigation">
             <ul>
              <li class="">
               <span class="vcard bbp-user-profile-link">
                <a class="url fn n" href="http://cos.name/cn/profile/ryo/" rel="me" title="®γσ的档案">
                 档案
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-topics-created-link">
                <a href="http://cos.name/cn/profile/ryo/topics/" title="®γσ发起的主题">
                 发起的主题
                </a>
               </span>
              </li>
              <li class="current">
               <span class="bbp-user-replies-created-link">
                <a href="http://cos.name/cn/profile/ryo/replies/" title="®γσ创建的回复">
                 创建的回复
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-favorites-link">
                <a href="http://cos.name/cn/profile/ryo/favorites/" title="®γσ的收藏夹">
                 收藏夹
                </a>
               </span>
              </li>
             </ul>
            </div>
            <!-- #bbp-user-navigation -->
           </div>
           <!-- #bbp-single-user-details -->
           <div id="bbp-user-body">
            <div class="bbp-user-replies-created" id="bbp-user-replies-created">
             <h2 class="entry-title">
              回复的主题
             </h2>
             <div class="bbp-user-section">
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 1 到 15（总计 203 个）
               </div>
               <div class="bbp-pagination-links">
                <span class="page-numbers current">
                 1
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/2/">
                 2
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/14/">
                 14
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/2/">
                 →
                </a>
               </div>
              </div>
              <ul class="forums bbp-replies" id="topic-0-replies">
               <li class="bbp-header">
                <div class="bbp-reply-author">
                 作者
                </div>
                <!-- .bbp-reply-author -->
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-header -->
               <li class="bbp-body">
                <div class="bbp-reply-header" id="post-417376">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年6月19日 上午9:12
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417372/">
                    处理时间数据和产生时间序列的问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417372/#post-417376">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417376 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-417372 bbp-reply-position-2 user-id-395984 post-417376 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   那不是rownames嚒？
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_confused.png"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417374">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年6月18日 下午6:42
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/16574/">
                    class(x) 返回值值是AsIs,AsIs代表什么，有什么用处？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/16574/#post-417374">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417374 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-16574 bbp-reply-position-2 user-id-395984 post-417374 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   刚观赏
                   <a href="https://www.youtube.com/watch?v=G_obrpV70QQ" rel="nofollow">
                    Variable Selection in Linear Regression Using Partial F-Test in R (Tutorial 5.11)
                   </a>
                   教程和阅读
                   <a href="http://adv-r.had.co.nz/Data-structures.html" rel="nofollow">
                    Advanced R – by Hadley Wickham
                   </a>
                   后测试了一下
                   <code>
                    I()
                   </code>
                   的用法…
                  </p>
                  <pre><code>
&gt; lm(height ~ age + I(age^2), data = cgd)

Call:
lm(formula = height ~ age + I(age^2), data = cgd)

Coefficients:
(Intercept)          age     I(age^2)  
    74.5879       7.3235      -0.1342  

&gt; lm(height ~ age + age^2, data = cgd)

Call:
lm(formula = height ~ age + age^2, data = cgd)

Coefficients:
(Intercept)          age  
     99.717        2.802

&gt; lm(height ~ age + cgd$age^2, data = cgd)

Call:
lm(formula = height ~ age + cgd$age^2, data = cgd)

Coefficients:
(Intercept)          age      cgd$age  
     99.717        2.802           NA  

&gt; lm(height ~ age + I(cgd$age^2), data = cgd)

Call:
lm(formula = height ~ age + I(cgd$age^2), data = cgd)

Coefficients:
 (Intercept)           age  I(cgd$age^2)  
     74.5879        7.3235       -0.1342  

&gt; lm(height ~ age, data = cgd)

Call:
lm(formula = height ~ age, data = cgd)

Coefficients:
(Intercept)          age  
     99.717        2.802  

&gt; lm(height ~ I(age), data = cgd)

Call:
lm(formula = height ~ I(age), data = cgd)

Coefficients:
(Intercept)       I(age)  
     99.717        2.802
</code></pre>
                  <p>
                   Hadley Wickham的《高级R》中的
                   <strong>
                    Data structures
                   </strong>
                   有阐明
                  </p>
                  <pre><code>
&gt; # Special columns
&gt; # Since a data frame is a list of vectors, it is possible for a data frame to have a column that is a list:

&gt; df &lt;- data.frame(x = 1:3)
&gt; df$y &lt;- list(1:2, 1:3, 1:4)
&gt; df
#   x          y
# 1 1       1, 2
# 2 2    1, 2, 3
# 3 3 1, 2, 3, 4
&gt; # However, when a list is given to data.frame(), it tries to put each item of the list into its own column, so this fails:

&gt; data.frame(x = 1:3, y = list(1:2, 1:3, 1:4))
# Error in data.frame(1:2, 1:3, 1:4, check.names = FALSE, stringsAsFactors = TRUE): arguments imply differing number of rows: 2, 3, 4
&gt; # A workaround is to use I(), which causes data.frame() to treat the list as one unit:

&gt; dfl &lt;- data.frame(x = 1:3, y = I(list(1:2, 1:3, 1:4)))
&gt; str(dfl)
# 'data.frame':    3 obs. of  2 variables:
#  $ x: int  1 2 3
#  $ y:List of 3
#   ..$ : int  1 2
#   ..$ : int  1 2 3
#   ..$ : int  1 2 3 4
#   ..- attr(*, "class")= chr "AsIs"
&gt; dfl[2, "y"]
# [[1]]
# [1] 1 2 3
&gt; # I() adds the AsIs class to its input, but this can usually be safely ignored.

&gt; # Similarly, it’s also possible to have a column of a data frame that’s a matrix or array, as long as the number of rows matches the data frame:

&gt; dfm &lt;- data.frame(x = 1:3, y = I(matrix(1:9, nrow = 3)))
&gt; str(dfm)
# 'data.frame':    3 obs. of  2 variables:
#  $ x: int  1 2 3
#  $ y: 'AsIs' int [1:3, 1:3] 1 2 3 4 5 6 7 8 9
&gt; dfm[2, "y"]
#      [,1] [,2] [,3]
# [1,]    2    5    8
&gt; # Use list and array columns with caution: many functions that work with data frames assume that all columns are atomic vectors.
</code></pre>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417245">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月21日 上午3:39
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417188/">
                    R中如何求出最大日期
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417188/#post-417245">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417245 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-417188 bbp-reply-position-4 user-id-395984 post-417245 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/417188/#post-417195" rel="nofollow">
                    3 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/hanberge/" rel="nofollow">
                    Abner
                   </a>
                   ：
                  </p>
                  <pre><code>&gt; any(is.na(x))
[1] FALSE
&gt; sum(is.na(x))
[1] 0
&gt; anyNA(x)
[1] FALSE
&gt; anyNA(y)
[1] TRUE
</code></pre>
                  <p>
                   都行…
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417244">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月21日 上午1:29
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417156/">
                    R 数据框定义新变量时 如何 忽略/处理 缺失值
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417156/#post-417244">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417244 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-417156 bbp-reply-position-3 user-id-395984 post-417244 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   <code>
                    &gt; rowSums(leadership[5:9], na.rm = TRUE)
                   </code>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417239">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月19日 下午8:47
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/105565/">
                    Emacs+ess+R+ubuntu的配置
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/105565/#post-417239">
                   12 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417239 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-105565 bbp-reply-position-12 user-id-395984 post-417239 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   咱多年也使用过Emacs，不过之后发现Notepad++就换了（而目前使用®Studio辑写脚本），介绍一下Notepad++…
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_wink.png"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417226">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月17日 下午8:47
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417221/">
                    R如何同时利用多函数汇总
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417221/#post-417226">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417226 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-417221 bbp-reply-position-2 user-id-395984 post-417226 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   <code>
                    &gt; ?dplyr::filter()
                   </code>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417220">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月16日 下午9:43
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417207/">
                    Linux上安装nloptr源码包，报错！！跪求大神帮忙解决！！（弄了两天我都没解决，快哭死了）
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417207/#post-417220">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417220 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-417207 bbp-reply-position-3 user-id-395984 post-417220 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   <code>
                    $sudo su -c "R -e \"devtools::install_github('jyypma/nloptr')\""
                   </code>
                   <br/>
                   或者
                   <br/>
                   <code>
                    $sudo su -c "R -e \"install.packages('nloptr', dependencies = TRUE, repo = 'https://cran.rstudio.com')\""
                   </code>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417170">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月7日 下午8:09
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/102982/">
                    &amp;和&amp;&amp;区别和联系？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102982/#post-417170">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417170 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-102982 bbp-reply-position-5 user-id-395984 post-417170 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/102982/#post-311030" rel="nofollow">
                    3 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/1/" rel="nofollow">
                    谢益辉
                   </a>
                   ：
                  </p>
                  <p>
                   哦？！谢谢蟹站长～
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_wink.png"/>
                   <br/>
                   阅读了以下几个网站的解释都不明白…
                   <br/>
                   –
                   <a href="http://stackoverflow.com/questions/4014535/differences-in-boolean-operators-vs-and-vs" rel="nofollow">
                    Differences in boolean operators: &amp; vs &amp;&amp; and | vs ||
                   </a>
                   <br/>
                   –
                   <a href="http://stackoverflow.com/questions/7199666/difference-between-and-in-java" rel="nofollow">
                    Difference between &amp; and &amp;&amp; in Java? [duplicate]
                   </a>
                   <br/>
                   –
                   <a href="http://stackoverflow.com/questions/9458602/whats-the-difference-between-and-and-and" rel="nofollow">
                    What’s the difference between (&amp;&amp; and &amp;) and (|| and |)? [duplicate]
                   </a>
                  </p>
                  <pre><code>2 &amp;&amp; 1 == 1
2 &amp; 1  == 0
0 || 2 == 1
0 | 2  == 2</code></pre>
                  <p>
                   咱还错误理解为以下缩写：
                  </p>
                  <pre><code>(2 == 1)|(1 == 1)
(2 == 0) &amp; (1 == 0)
(0 == 1) &amp; (2 == 1)
(0 == 2)|(2 == 2)</code></pre>
                  <p>
                   原来是nested lapply的缩写。
                  </p>
                  <p>
                   最近在学习shiny频频遇到vector和null等错误信息，还有&amp;&amp;和||、environment等应用… 还得先阅读了Advanced R和了解是否version不够新，需等待fedoralproject更新到R3.3才能办事儿…
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/gnome_face_plain.png"/>
                   <br/>
                   <a href="http://adv-r.had.co.nz/Environments.html" rel="nofollow">
                    Environments
                   </a>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417151">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月4日 下午5:56
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/9582/">
                    我学习统计的经历 [原创，请勿转载]
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/9582/page/4/#post-417151">
                   54 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417151 -->
                <div class="odd bbp-parent-forum-1002 bbp-parent-topic-9582 bbp-reply-position-54 user-id-395984 post-417151 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/9582/page/4/#post-417147" rel="nofollow">
                    53 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/xlz/" rel="nofollow">
                    xlz
                   </a>
                   ：
                  </p>
                  <p>
                   羡慕吖，目前暂还只是修读专业课程，因为没有钱和负债，只能等下周开始上班（虽然只是个月入几千元马币的小小基层的客服人员而已，但是还得继续学习
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_wink.png"/>
                   ）后有了点儿工资才能慢慢还债和存款… 六月的数据科学学士课程的截止的伊利诺大学网络学士课程就得先搁着.. 过几个月还清债务和供完车子就轻松多了，才报名下个学期的开学课程，一修读就得三五年了（最多五年），还要加上额外两年的硕士课程一共可能得五年至七年才能获得硕士学位… 漫漫长路还得继续边学边读边打工～共而勉之呗！
                  </p>
                  <p>
                   谢益辉就厉害了，博士… 希望大伙儿都加油，科学乃科技之本，而科技乃发展国家的基本元素… 所以科学与科技万岁万岁万万岁！
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_smile.png"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417150">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月4日 下午5:36
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417142/">
                    Igraph数据格式转换问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417142/#post-417150">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417150 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-417142 bbp-reply-position-2 user-id-395984 post-417150 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre><code>&gt; library('igraph')
&gt; library('dplyr')
&gt; file %&gt;% read.graph %&gt;% get.data.frame #file is your file
</code></pre>
                  <p>
                   嘎嘎嘎，上个星期刚做学校功课时学会的
                   <a href="https://github.com/englianhu/Coursera-Data-Mining/blob/master/Data%20Visualization/Programming-Assignment-2-Submission.Rmd" rel="nofollow">
                    Programming-Assignment-2-Submission
                   </a>
                   ，分享一下学会的东西… 共而勉之！
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_wink.png"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417137">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月3日 下午4:48
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/9582/">
                    我学习统计的经历 [原创，请勿转载]
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/9582/page/4/#post-417137">
                   52 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417137 -->
                <div class="odd bbp-parent-forum-1002 bbp-parent-topic-9582 bbp-reply-position-52 user-id-395984 post-417137 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/9582/#post-9582" rel="nofollow">
                    1 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/48308/" rel="nofollow">
                    xuanie
                   </a>
                   ：
                  </p>
                  <p>
                   哇噢，感谢分享经历哦，励志的故事！干爸爹～
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_laughing.png"/>
                  </p>
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/9582/#post-242754" rel="nofollow">
                    5 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/336/" rel="nofollow">
                    刘思喆
                   </a>
                   ：
                  </p>
                  <p>
                   咱也是以前看到统计学全是密密麻麻的数字都头昏腦眩（虽然知道很实用，很厉害的科系），到慢慢自修爱上统计学和R… 去年还特地建立了个
                   <a href="https://github.com/scibrokes/setup-rstudio-server" rel="nofollow">
                    安装 ®StudioとShiny服务器
                   </a>
                   … 希望与大伙儿分享～
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_wink.png"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417136">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月3日 下午4:33
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417077/">
                    多个p值如何综合成一个p值
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417077/#post-417136">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417136 -->
                <div class="even bbp-parent-forum-991 bbp-parent-topic-417077 bbp-reply-position-2 user-id-395984 post-417136 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre><code>&gt; m1 &lt;- lm(Sepal.Length ~ Sepal.Width + Species, data = iris)
&gt; summary(m1)

Call:
lm(formula = Sepal.Length ~ Sepal.Width + Species, data = iris)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.30711 -0.25713 -0.05325  0.19542  1.41253 

Coefficients:
                  Estimate Std. Error t value Pr(&gt;|t|)    
(Intercept)         2.2514     0.3698   6.089 9.57e-09 ***
Sepal.Width         0.8036     0.1063   7.557 4.19e-12 ***
Speciesversicolor   1.4587     0.1121  13.012  &lt; 2e-16 ***
Speciesvirginica    1.9468     0.1000  19.465  &lt; 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.438 on 146 degrees of freedom
Multiple R-squared:  0.7259,	Adjusted R-squared:  0.7203 
F-statistic: 128.9 on 3 and 146 DF,  p-value: &lt; 2.2e-16

&gt; summary(m2)

Call:
lm(formula = Petal.Length ~ Petal.Width + Species, data = iris)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.02977 -0.22241 -0.01514  0.18180  1.17449 

Coefficients:
                  Estimate Std. Error t value Pr(&gt;|t|)    
(Intercept)        1.21140    0.06524  18.568  &lt; 2e-16 ***
Petal.Width        1.01871    0.15224   6.691 4.41e-10 ***
Speciesversicolor  1.69779    0.18095   9.383  &lt; 2e-16 ***
Speciesvirginica   2.27669    0.28132   8.093 2.08e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3777 on 146 degrees of freedom
Multiple R-squared:  0.9551,	Adjusted R-squared:  0.9542 
F-statistic:  1036 on 3 and 146 DF,  p-value: &lt; 2.2e-16</code></pre>
                  <p>
                   然后介绍以下
                   <code>
                    pf()
                   </code>
                   加
                   <code>
                    sapply()
                   </code>
                   ，（刚才好好好的，怎么突然间失灵了
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_confused.png"/>
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_confused.png"/>
                   <img src="http://cos.name/cn/wp-content/plugins/wp-monalisa/icons/face_confused.png"/>
                   1+2=3的答案竟然变成不是3了？！这是展马啦？！）：
                   <br/>
                   <a href="http://stats.stackexchange.com/questions/94914/how-to-get-f-test-p-value" rel="nofollow">
                    How to get F-test p-value
                   </a>
                  </p>
                  <pre><code>&gt; p.value &lt;- function(x) pf(summary(x)$fstatistic[1], summary(x)$fstatistic[2], summary(x)$fstatistic[3], lower.tail = FALSE)
&gt; sapply(list(m1, m2), p.value)
       value        value 
7.664374e-41 3.698514e-98</code></pre>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417135">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月3日 下午3:52
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/416952/">
                    R画图
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/416952/#post-417135">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417135 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-416952 bbp-reply-position-3 user-id-395984 post-417135 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复
                   <a href="http://cos.name/cn/topic/416952/#post-417079" rel="nofollow">
                    2 楼
                   </a>
                   的
                   <a href="http://cos.name/cn/profile/392170/" rel="nofollow">
                    dvd-hover
                   </a>
                   ：
                  </p>
                  <p>
                   最近学校功课都是数据视觉化，嘎嘎嘎～
                  </p>
                  <pre><code>&gt; library('googleVis')
&gt; iris %&gt;% tbl_df
Source: local data frame [150 x 5]

   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
          (dbl)       (dbl)        (dbl)       (dbl)  (fctr)
1           5.1         3.5          1.4         0.2  setosa
2           4.9         3.0          1.4         0.2  setosa
3           4.7         3.2          1.3         0.2  setosa
4           4.6         3.1          1.5         0.2  setosa
5           5.0         3.6          1.4         0.2  setosa
6           5.4         3.9          1.7         0.4  setosa
7           4.6         3.4          1.4         0.3  setosa
8           5.0         3.4          1.5         0.2  setosa
9           4.4         2.9          1.4         0.2  setosa
10          4.9         3.1          1.5         0.1  setosa
..          ...         ...          ...         ...     ...
&gt; Combo &lt;- gvisComboChart(iris, xvar = 'Species',
+                         yvar = c('Sepal.Length', 'Sepal.Width', 'Petal.Length', 'Petal.Width'),
+                         options=list(seriesType = 'bars',
+                                      series='{1: {type:"line"}}'))
&gt; plot(Combo)</code></pre>
                  <p>
                   <img src="http://i.imgur.com/TBxbNdC.png?1"/>
                  </p>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417134">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月3日 下午3:44
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417025/">
                    R中带名字的向量的打印问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417025/#post-417134">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417134 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-417025 bbp-reply-position-5 user-id-395984 post-417134 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre><code>&gt; a &lt;- c(dog = 1, cat = 2, mouse = 3)
&gt; a
  dog   cat mouse 
    1     2     3
&gt; ##四楼的对
&gt; as.numeric(a[1])
[1] 1</code></pre>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-417133">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2016年5月3日 下午3:37
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/417113/">
                    如何转换为矩阵的数据结构
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/417113/#post-417133">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-417133 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-417113 bbp-reply-position-2 user-id-395984 post-417133 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   <img src="http://sdn.geekzu.org/avatar/3dda24c472e8a4045081ee2b431ae53c?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/ryo/" rel="nofollow" title="查看®γσ的档案">
                   ®γσ
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre><code>&gt; library('dplyr')
&gt; m &lt;- data.frame(V1 = rep(letters[1:4], 2), V2 = c(rep(LETTERS[1], 4), rep(LETTERS[2], 4)), V3 = c(2, 3, 3, 5, 4, 3, 3, 5)) %&gt;% tbl_df
&gt; m
Source: local data frame [8 x 3]

      V1     V2    V3
  (fctr) (fctr) (dbl)
1      a      A     2
2      b      A     3
3      c      A     3
4      d      A     5
5      a      B     4
6      b      B     3
7      c      B     3
8      d      B     5</code></pre>
                  <pre><code>&gt; reshape2::dcast(m, V1 ~ V2)
Using V3 as value column: use value.var to override.
  V1 A B
1  a 2 4
2  b 3 3
3  c 3 3
4  d 5 5</code></pre>
                  <pre><code>&gt; tidyr::&gt; spread(m, V2, V3)
Source: local data frame [4 x 3]

      V1     A     B
  (fctr) (dbl) (dbl)
1      a     2     4
2      b     3     3
3      c     3     3
4      d     5     5</code></pre>
                  <div class="bbp-signature">
                   <p>
                    白戸則道：悟空がやらなきゃ誰がやる！
                    <br/>
                    http://github.com/scibrokes/owner
                   </p>
                  </div>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
               </li>
               <!-- .bbp-body -->
               <li class="bbp-footer">
                <div class="bbp-reply-author">
                 作者
                </div>
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-footer -->
              </ul>
              <!-- #topic-0-replies -->
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 1 到 15（总计 203 个）
               </div>
               <div class="bbp-pagination-links">
                <span class="page-numbers current">
                 1
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/2/">
                 2
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/14/">
                 14
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/ryo/replies/page/2/">
                 →
                </a>
               </div>
              </div>
             </div>
            </div>
            <!-- #bbp-user-replies-created -->
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>